using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class report_parameterMap : EntityTypeConfiguration<report_parameter>
    {
        public report_parameterMap()
        {
            // Primary Key
            this.HasKey(t => t.report_id);

            // Properties
            this.Property(t => t.report_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.report_name)
                .HasMaxLength(100);

            this.Property(t => t.report_server)
                .HasMaxLength(500);

            this.Property(t => t.report_path)
                .HasMaxLength(500);

            this.Property(t => t.report_name_en)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("report_parameter");
            this.Property(t => t.report_id).HasColumnName("report_id");
            this.Property(t => t.report_name).HasColumnName("report_name");
            this.Property(t => t.report_server).HasColumnName("report_server");
            this.Property(t => t.report_path).HasColumnName("report_path");
            this.Property(t => t.report_name_en).HasColumnName("report_name_en");
            this.Property(t => t.report_category_id).HasColumnName("report_category_id");
        }
    }
}
